﻿using AuthCenter.Domain;
using AuthCenter.ErorCode;
using AuthCenter.Infrastructure;
using AuthCenter_API.Read.Applications.Commands.BaoBiao;
using AuthCenter_API.Read.Dtos;
using MediatR;

namespace AuthCenter_API.Read.Applications.CommandHandlers.BaoBiao
{
    public class GetBaobiaoQueryCommandHandler : IRequestHandler<GetBaobiaoQueryCommand, APIResult<List<BaoBiaodto>>>
    {
        private readonly IBaseRepository<UserModel> _userRepository;
        private readonly IBaseRepository<ShenPiModel> _shenpiRepository;
        private readonly DataDbContext context;
        public GetBaobiaoQueryCommandHandler(IBaseRepository<UserModel> userRepository, IBaseRepository<ShenPiModel> shenpiRepository, DataDbContext context)
        {
            _userRepository = userRepository;
            _shenpiRepository = shenpiRepository;
            this.context = context;
        }

        public Task<APIResult<List<BaoBiaodto>>> Handle(GetBaobiaoQueryCommand request, CancellationToken cancellationToken)
        {
            APIResult<List<BaoBiaodto>> result = new APIResult<List<BaoBiaodto>>();
            result.Code = APIEnum.QuerySuccess;
            result.Message = APIEnum.QuerySuccess.Desc();
            return Task.FromResult(result);
        }
    }
}
